﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BLL;
using InterfaceSite;
using Model;

namespace Site.Controllers
{
    public class HomeController : Controller
    {
        public ISiteDemo IsiteDemo { set; get; }
        public ActionResult Index()
        {
            return View(new Question());
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
        [ValidateInput(false)]
        public ActionResult SaveQuestion(Question question)
        {
            IsiteDemo.Create(question);
            return RedirectToAction("Index");

        }
    }
}